#include <memchart.hpp>

#include "node.hpp"

using memchart::update;

void foo (Node *p)
{
	p->a = new Node;
	p->b = new Node;
	p->c = new Node;
}

int main ()
{
	Node *x = new Node;

	foo(x);
	foo(x->a);
	foo(x->b);
	foo(x->c);

	x->a->d = x->b;
	x->b->d = x->c;
	x->c->d = x->a;

	update();
}
